import http from "@/utils/http2"

/**
 * 保存到货单
 * @param {*} data 
 * @returns 
 */
export function save(data) {
  return http.post("/api/arrival/save", data)
}
/**
 * 获取到货单列表信息
 * @param {} data 
 * @returns 
 */
export function getList(params) {
  return http.post("/api/arrival/list", params)
}
/**
 * 根据id删除到货单
 * @param {*} id 
 * @returns 
 */
export function deleteArrivalById(arrivalId) {
  return http.delete("/api/arrival/deleteById", { id: arrivalId });
}
/**
 * 根据id获取到货单详情信息
 * @param {} id 
 * @returns 
 */
export function getArrivalDetailById(id) {
  return http.get("/api/arrival/getById", id)
}
/**
 * 根据到货单id获取质检信息
 * @param {*} arrivalId 
 */
export function getInspectionById(arrivalId) {
  return http.get("/api/arrival/getInspect", arrivalId)
}
/**
 * 根据id更新质检信息
 * @param {*} id 
 * @param {*} data 
 * @returns 
 */
export function updateInspectById(id, data) {
  return http.put(`/api/inspect/changeById/${id}`, data);

}